package com.entity;

import java.util.ArrayList;
import java.util.List;

public class CommentExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public CommentExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andCoidIsNull() {
            addCriterion("coid is null");
            return (Criteria) this;
        }

        public Criteria andCoidIsNotNull() {
            addCriterion("coid is not null");
            return (Criteria) this;
        }

        public Criteria andCoidEqualTo(Integer value) {
            addCriterion("coid =", value, "coid");
            return (Criteria) this;
        }

        public Criteria andCoidNotEqualTo(Integer value) {
            addCriterion("coid <>", value, "coid");
            return (Criteria) this;
        }

        public Criteria andCoidGreaterThan(Integer value) {
            addCriterion("coid >", value, "coid");
            return (Criteria) this;
        }

        public Criteria andCoidGreaterThanOrEqualTo(Integer value) {
            addCriterion("coid >=", value, "coid");
            return (Criteria) this;
        }

        public Criteria andCoidLessThan(Integer value) {
            addCriterion("coid <", value, "coid");
            return (Criteria) this;
        }

        public Criteria andCoidLessThanOrEqualTo(Integer value) {
            addCriterion("coid <=", value, "coid");
            return (Criteria) this;
        }

        public Criteria andCoidIn(List<Integer> values) {
            addCriterion("coid in", values, "coid");
            return (Criteria) this;
        }

        public Criteria andCoidNotIn(List<Integer> values) {
            addCriterion("coid not in", values, "coid");
            return (Criteria) this;
        }

        public Criteria andCoidBetween(Integer value1, Integer value2) {
            addCriterion("coid between", value1, value2, "coid");
            return (Criteria) this;
        }

        public Criteria andCoidNotBetween(Integer value1, Integer value2) {
            addCriterion("coid not between", value1, value2, "coid");
            return (Criteria) this;
        }

        public Criteria andConameIsNull() {
            addCriterion("coname is null");
            return (Criteria) this;
        }

        public Criteria andConameIsNotNull() {
            addCriterion("coname is not null");
            return (Criteria) this;
        }

        public Criteria andConameEqualTo(String value) {
            addCriterion("coname =", value, "coname");
            return (Criteria) this;
        }

        public Criteria andConameNotEqualTo(String value) {
            addCriterion("coname <>", value, "coname");
            return (Criteria) this;
        }

        public Criteria andConameGreaterThan(String value) {
            addCriterion("coname >", value, "coname");
            return (Criteria) this;
        }

        public Criteria andConameGreaterThanOrEqualTo(String value) {
            addCriterion("coname >=", value, "coname");
            return (Criteria) this;
        }

        public Criteria andConameLessThan(String value) {
            addCriterion("coname <", value, "coname");
            return (Criteria) this;
        }

        public Criteria andConameLessThanOrEqualTo(String value) {
            addCriterion("coname <=", value, "coname");
            return (Criteria) this;
        }

        public Criteria andConameLike(String value) {
            addCriterion("coname like", value, "coname");
            return (Criteria) this;
        }

        public Criteria andConameNotLike(String value) {
            addCriterion("coname not like", value, "coname");
            return (Criteria) this;
        }

        public Criteria andConameIn(List<String> values) {
            addCriterion("coname in", values, "coname");
            return (Criteria) this;
        }

        public Criteria andConameNotIn(List<String> values) {
            addCriterion("coname not in", values, "coname");
            return (Criteria) this;
        }

        public Criteria andConameBetween(String value1, String value2) {
            addCriterion("coname between", value1, value2, "coname");
            return (Criteria) this;
        }

        public Criteria andConameNotBetween(String value1, String value2) {
            addCriterion("coname not between", value1, value2, "coname");
            return (Criteria) this;
        }

        public Criteria andColevelIsNull() {
            addCriterion("colevel is null");
            return (Criteria) this;
        }

        public Criteria andColevelIsNotNull() {
            addCriterion("colevel is not null");
            return (Criteria) this;
        }

        public Criteria andColevelEqualTo(Integer value) {
            addCriterion("colevel =", value, "colevel");
            return (Criteria) this;
        }

        public Criteria andColevelNotEqualTo(Integer value) {
            addCriterion("colevel <>", value, "colevel");
            return (Criteria) this;
        }

        public Criteria andColevelGreaterThan(Integer value) {
            addCriterion("colevel >", value, "colevel");
            return (Criteria) this;
        }

        public Criteria andColevelGreaterThanOrEqualTo(Integer value) {
            addCriterion("colevel >=", value, "colevel");
            return (Criteria) this;
        }

        public Criteria andColevelLessThan(Integer value) {
            addCriterion("colevel <", value, "colevel");
            return (Criteria) this;
        }

        public Criteria andColevelLessThanOrEqualTo(Integer value) {
            addCriterion("colevel <=", value, "colevel");
            return (Criteria) this;
        }

        public Criteria andColevelIn(List<Integer> values) {
            addCriterion("colevel in", values, "colevel");
            return (Criteria) this;
        }

        public Criteria andColevelNotIn(List<Integer> values) {
            addCriterion("colevel not in", values, "colevel");
            return (Criteria) this;
        }

        public Criteria andColevelBetween(Integer value1, Integer value2) {
            addCriterion("colevel between", value1, value2, "colevel");
            return (Criteria) this;
        }

        public Criteria andColevelNotBetween(Integer value1, Integer value2) {
            addCriterion("colevel not between", value1, value2, "colevel");
            return (Criteria) this;
        }

        public Criteria andCopidIsNull() {
            addCriterion("copid is null");
            return (Criteria) this;
        }

        public Criteria andCopidIsNotNull() {
            addCriterion("copid is not null");
            return (Criteria) this;
        }

        public Criteria andCopidEqualTo(Integer value) {
            addCriterion("copid =", value, "copid");
            return (Criteria) this;
        }

        public Criteria andCopidNotEqualTo(Integer value) {
            addCriterion("copid <>", value, "copid");
            return (Criteria) this;
        }

        public Criteria andCopidGreaterThan(Integer value) {
            addCriterion("copid >", value, "copid");
            return (Criteria) this;
        }

        public Criteria andCopidGreaterThanOrEqualTo(Integer value) {
            addCriterion("copid >=", value, "copid");
            return (Criteria) this;
        }

        public Criteria andCopidLessThan(Integer value) {
            addCriterion("copid <", value, "copid");
            return (Criteria) this;
        }

        public Criteria andCopidLessThanOrEqualTo(Integer value) {
            addCriterion("copid <=", value, "copid");
            return (Criteria) this;
        }

        public Criteria andCopidIn(List<Integer> values) {
            addCriterion("copid in", values, "copid");
            return (Criteria) this;
        }

        public Criteria andCopidNotIn(List<Integer> values) {
            addCriterion("copid not in", values, "copid");
            return (Criteria) this;
        }

        public Criteria andCopidBetween(Integer value1, Integer value2) {
            addCriterion("copid between", value1, value2, "copid");
            return (Criteria) this;
        }

        public Criteria andCopidNotBetween(Integer value1, Integer value2) {
            addCriterion("copid not between", value1, value2, "copid");
            return (Criteria) this;
        }

        public Criteria andCodescIsNull() {
            addCriterion("codesc is null");
            return (Criteria) this;
        }

        public Criteria andCodescIsNotNull() {
            addCriterion("codesc is not null");
            return (Criteria) this;
        }

        public Criteria andCodescEqualTo(String value) {
            addCriterion("codesc =", value, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescNotEqualTo(String value) {
            addCriterion("codesc <>", value, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescGreaterThan(String value) {
            addCriterion("codesc >", value, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescGreaterThanOrEqualTo(String value) {
            addCriterion("codesc >=", value, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescLessThan(String value) {
            addCriterion("codesc <", value, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescLessThanOrEqualTo(String value) {
            addCriterion("codesc <=", value, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescLike(String value) {
            addCriterion("codesc like", value, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescNotLike(String value) {
            addCriterion("codesc not like", value, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescIn(List<String> values) {
            addCriterion("codesc in", values, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescNotIn(List<String> values) {
            addCriterion("codesc not in", values, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescBetween(String value1, String value2) {
            addCriterion("codesc between", value1, value2, "codesc");
            return (Criteria) this;
        }

        public Criteria andCodescNotBetween(String value1, String value2) {
            addCriterion("codesc not between", value1, value2, "codesc");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}